import 'package:factoryside/bean/prod_specifications_entity.dart';

prodSpecificationsEntityFromJson(ProdSpecificationsEntity data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['FSpecificationsID'] != null) {
		data.fSpecificationsID = json['FSpecificationsID'] is String
				? int.tryParse(json['FSpecificationsID'])
				: json['FSpecificationsID'].toInt();
	}
	if (json['UserID'] != null) {
		data.userID = json['UserID'];
	}
	if (json['CompanyName'] != null) {
		data.companyName = json['CompanyName'];
	}
	if (json['ParentID'] != null) {
		data.parentID = json['ParentID'] is String
				? int.tryParse(json['ParentID'])
				: json['ParentID'].toInt();
	}
	if (json['SpecificationsID'] != null) {
		data.specificationsID = json['SpecificationsID'] is String
				? int.tryParse(json['SpecificationsID'])
				: json['SpecificationsID'].toInt();
	}
	if (json['FCategoryName'] != null) {
		data.fCategoryName = json['FCategoryName'].toString();
	}
	if (json['Guarantee'] != null) {
		data.guarantee = json['Guarantee'];
	}
	if (json['PriceType'] != null) {
		data.priceType = json['PriceType'] is String
				? int.tryParse(json['PriceType'])
				: json['PriceType'].toInt();
	}
	if (json['TypeName'] != null) {
		data.typeName = json['TypeName'];
	}
	if (json['StandardPrice'] != null) {
		data.standardPrice = json['StandardPrice'] is String
				? int.tryParse(json['StandardPrice'])
				: json['StandardPrice'].toInt();
	}
	if (json['FactoryPrice'] != null) {
		data.factoryPrice = json['FactoryPrice'] is String
				? int.tryParse(json['FactoryPrice'])
				: json['FactoryPrice'].toInt();
	}
	if (json['UserPrice'] != null) {
		data.userPrice = json['UserPrice'] is String
				? int.tryParse(json['UserPrice'])
				: json['UserPrice'].toInt();
	}
	if (json['CreateDate'] != null) {
		data.createDate = json['CreateDate'];
	}
	if (json['Operator'] != null) {
		data.xOperator = json['Operator'];
	}
	if (json['PlatformFee'] != null) {
		data.platformFee = json['PlatformFee'] is String
				? int.tryParse(json['PlatformFee'])
				: json['PlatformFee'].toInt();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['Content'] != null) {
		data.content = json['Content'];
	}
	if (json['AllAccessoryName'] != null) {
		data.allAccessoryName = json['AllAccessoryName'];
	}
	if (json['StandardPriceOut'] != null) {
		data.standardPriceOut = json['StandardPriceOut'] is String
				? int.tryParse(json['StandardPriceOut'])
				: json['StandardPriceOut'].toInt();
	}
	if (json['FactoryPriceOut'] != null) {
		data.factoryPriceOut = json['FactoryPriceOut'] is String
				? int.tryParse(json['FactoryPriceOut'])
				: json['FactoryPriceOut'].toInt();
	}
	if (json['PlatformFeeOut'] != null) {
		data.platformFeeOut = json['PlatformFeeOut'] is String
				? int.tryParse(json['PlatformFeeOut'])
				: json['PlatformFeeOut'].toInt();
	}
	if (json['FactoryAccessorys'] != null) {
		data.factoryAccessorys = json['FactoryAccessorys'];
	}
	if (json['FactoryServices'] != null) {
		data.factoryServices = json['FactoryServices'];
	}
	if (json['page'] != null) {
		data.page = json['page'] is String
				? int.tryParse(json['page'])
				: json['page'].toInt();
	}
	if (json['limit'] != null) {
		data.limit = json['limit'] is String
				? int.tryParse(json['limit'])
				: json['limit'].toInt();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> prodSpecificationsEntityToJson(ProdSpecificationsEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['FSpecificationsID'] = entity.fSpecificationsID;
	data['UserID'] = entity.userID;
	data['CompanyName'] = entity.companyName;
	data['ParentID'] = entity.parentID;
	data['SpecificationsID'] = entity.specificationsID;
	data['FCategoryName'] = entity.fCategoryName;
	data['Guarantee'] = entity.guarantee;
	data['PriceType'] = entity.priceType;
	data['TypeName'] = entity.typeName;
	data['StandardPrice'] = entity.standardPrice;
	data['FactoryPrice'] = entity.factoryPrice;
	data['UserPrice'] = entity.userPrice;
	data['CreateDate'] = entity.createDate;
	data['Operator'] = entity.xOperator;
	data['PlatformFee'] = entity.platformFee;
	data['IsUse'] = entity.isUse;
	data['Content'] = entity.content;
	data['AllAccessoryName'] = entity.allAccessoryName;
	data['StandardPriceOut'] = entity.standardPriceOut;
	data['FactoryPriceOut'] = entity.factoryPriceOut;
	data['PlatformFeeOut'] = entity.platformFeeOut;
	data['FactoryAccessorys'] = entity.factoryAccessorys;
	data['FactoryServices'] = entity.factoryServices;
	data['page'] = entity.page;
	data['limit'] = entity.limit;
	data['Version'] = entity.version;
	return data;
}